<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>选择器练习</title>
    <style>
       #p1{color: green;}

        .c1{color: red}

        #p2{background: red}
        #p3{background: red}

        input[type='text']{background: green}

        body>div>div>p{color: pink}

        body div div p{background: yellow}

        a:link{color: green}
        a:visited{color: red}
        a:hover{color: yellow}
        a:active{color: pink}



    </style>
</head>
<body>
<ul>
    <li id="p1">关羽</li>
    <li class="c1">张飞</li>
    <li>诸葛亮</li>
    <li>鸟在隆中，恨关羽不能张飞</li>

</ul>

<p id="p2" >香蕉</p>
<p class="c1" id="p3" >苹果</p>

<input type="text">
<input type="password">

<div>
    <p>p1</p>
    <div><p>p2</p></div>
    <div><div><p>p3</p></div></div>
</div>

<a href="http://www.jd.com">京东</a>

</body>
</html>